<div class="row">
  <div class="col-xs-12">
    <%= render partial:  'common/nav', locals: {show_tab: :index, model_nav_name: :admin_article_type, pjax: true} %>
    <%= form_for 'ArticleType', url: admin_article_types_destroy_multi_path, method: :post, data: { confirm: "#{  t 'common.confirm_delete'}"} do %>
    <button class="btn btn-minier btn-danger" type="submit"><i class="icon-trash"></i> <%= t 'common.delete_multi' %></button>
    <div id="admin_article_types">
      <%= grid(@article_types, show_filters: :when_filtered) do |g|
      g.action_column param_name: :select_ids, object_property: :id
      g.column name: "#{t 'activerecord.attributes.defaults.id'}", attribute: 'id', filter: false, ordering: true
      g.column name: "#{t 'activerecord.attributes.article_type.name'}", attribute: 'name' do |c|
        link_to c.name, admin_article_type_path(c.id), class: :pjax
      end
      g.column name: "#{t 'activerecord.attributes.article_type.prosition'}", attribute: 'prosition'

        g.column  do |c|
          grid_operator(:admin_article_type_path, c.id)
        end
      end %>
    </div>

    <% end %>
  </div>
</div>

<script>
    $(function () {
        $('.nav.nav-list li.active').removeClass('active');
        $('.nav.nav-list li[data-model="article_type_list"]').addClass('active');
    } );
</script>